package com.ecco.persistent;

import java.util.List;

import javax.ejb.Local;

@Local
public interface ObjectsAgentLocal {
	//life cycle method
	public void save(Objects persistentInstance);
	//life cycle method
	public void delete(Objects persistentInstance);
	//life cycle method
	public Objects update(Objects detachedInstance);
	
	//return all Objects records by ob_name as a List<Objects>
	public List<Objects> findByObName(String ob_name);
	//return all Objects records search by some part of ob_name as a List<Objects>
	public List<Objects> searchByObName(String ob_name);

	//return all Objects records by ob_id as a Objects class
	public Objects findObjectsById(Integer ob_id);
	//return all Objects records as a list<Objects> 
	public List<Objects> findAll();
	
	//life cycle method(save)
	public void addObjects(String ob_name);
	//life cycle method(update)
	public void updateObjects(Integer ob_id, String ob_name);
	//life cycle method(delete)
	public void removeObjectsById(Integer ob_id);
	
	//return number of AOC Records find by ob_id as a number
	public Integer findNumOfAOCRecordsByOb_id(Integer ob_id);
	//check exist ob_name return a boolean
	public Boolean checkByObName(String ob_name);
	
}
